using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._LayersandTableViews
{
    /// <summary>
    /// <para>Make Feature Layer</para>
    /// <para>Creates a feature layer from an input feature class or layer file. The layer that is created by the tool is temporary and will not persist after the session ends unless the layer is saved to disk or the map document is saved.</para>
    /// <para>根据输入要素类或图层文件创建要素图层。该工具创建的图层是临时的，除非将图层保存到磁盘或保存地图文档，否则会话结束后不会保留。</para>
    /// </summary>    
    [DisplayName("Make Feature Layer")]
    public class MakeFeatureLayer : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public MakeFeatureLayer()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The input feature class or layer from which to make the new layer. Complex feature classes, such as annotation and dimensions, are not valid inputs to this tool.</para>
        /// <para>用于创建新图层的输入要素类或图层。复杂要素类（例如注记和尺寸）不是此工具的有效输入。</para>
        /// </param>
        /// <param name="_out_layer">
        /// <para>Output Layer</para>
        /// <para>The name of the feature layer to be created. The newly created layer can be used as input to any geoprocessing tool that accepts a feature layer as input.</para>
        /// <para>要创建的要素图层的名称。新创建的图层可用作接受要素图层作为输入的任何地理处理工具的输入。</para>
        /// </param>
        public MakeFeatureLayer(object _in_features, object _out_layer)
        {
            this._in_features = _in_features;
            this._out_layer = _out_layer;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Make Feature Layer";

        public override string CallName => "management.MakeFeatureLayer";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_features, _out_layer, _where_clause, _workspace, _field_info];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The input feature class or layer from which to make the new layer. Complex feature classes, such as annotation and dimensions, are not valid inputs to this tool.</para>
        /// <para>用于创建新图层的输入要素类或图层。复杂要素类（例如注记和尺寸）不是此工具的有效输入。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Output Layer</para>
        /// <para>The name of the feature layer to be created. The newly created layer can be used as input to any geoprocessing tool that accepts a feature layer as input.</para>
        /// <para>要创建的要素图层的名称。新创建的图层可用作接受要素图层作为输入的任何地理处理工具的输入。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Layer")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_layer { get; set; }


        /// <summary>
        /// <para>Expression</para>
        /// <para>An SQL expression used to select a subset of features.</para>
        /// <para>用于选择要素子集的 SQL 表达式。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Expression")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _where_clause { get; set; } = null;


        /// <summary>
        /// <para>Workspace or Feature Dataset</para>
        /// <para>The input workspace used to validate the field names. If the input is a geodatabase table and the output workspace is a dBASE table, the field names may be truncated, since dBASE fields can only have names of ten characters or less.</para>
        /// <para>用于验证字段名称的输入工作空间。如果输入是地理数据库表，而输出工作空间是 dBASE 表，则字段名称可能会被截断，因为 dBASE 字段的名称只能不超过 10 个字符。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Workspace or Feature Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _workspace { get; set; } = null;


        /// <summary>
        /// <para>Field Info</para>
        /// <para>Can be used to review and hide a subset of fields in the output layer. A split policy can be specified. See the usages for more information.</para>
        /// <para>可用于查看和隐藏输出图层中的字段子集。可以指定拆分策略。有关详细信息，请参阅用法。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Field Info")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _field_info { get; set; } = null;


        public MakeFeatureLayer SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}